home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 53 / PC Actual CD 53.iso / VNULabs / ProgramacionSonido / WTest / DSUtiles.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-07  |  1.2 KB  |  46 lines

  1. // ============================================================
  2. //   LeaRNWaRe code by CROM / Spanish  Lords 
  3. //                            - since 1993 -
  4. //
  5. //   Objetivo   : Manejo de un buffer canalizado - Polling.
  6. //   Autor      : Pedro Ant≤n Alonso. crom@ergos.es
  7. //   Plataforma : Windows 95 / NT & Direct X
  8. //   Compilador : Visual C++ 6.0
  9. //
  10. // ============================================================
  11.  
  12. #ifndef DSOUND_LEARNWARE_UTILES_H
  13. #define DSOUND_LEARNWARE_UTILES_H
  14.  
  15. #include <stdio.h>
  16. #include <dsound.h>
  17. #include "wave.h"
  18. #include "resource.h"
  19.  
  20. class CDSUtil
  21. {
  22. public:
  23.   BOOL                 bPlaying;
  24.  
  25. private:
  26.   LPDIRECTSOUND        lpDS;
  27.   LPDIRECTSOUNDBUFFER  lpDSB;
  28.   WAVEFORMATEX        *pWaveFormat;
  29.   HMMIO                hmmio;
  30.   MMCKINFO             mmckInfo, mmckInfoParent;
  31.   DWORD                dwMiddleBuffer;
  32.   DWORD                dwLastPlayPos;
  33.  
  34. public:
  35.   BOOL  Init              (HWND hwnd,HINSTANCE hinst,GUID *pguid);
  36.   void  End               ();
  37.   BOOL  Play              ();
  38.   void  StartPlay         ();
  39.   void  StopPlay          ();
  40.   BOOL  LoadWavInBuffer   (LPSTR FileName);
  41.  
  42. private:
  43.   BOOL ClearBuffer        ();
  44. };
  45.  
  46. #endif